const gulp = require('gulp')
const webserver = require('gulp-webserver')

const webHandler = function (){
    return gulp
    .src('./dist')
    .pipe(webserver({
        host:'www.zd.com',
        port:'8080',
        livereload:true,
        open:'./pages/login.html',
        proxies:[
            {
                source:'/dt',
                target:'https://www.duitang.com/napi/blog/list/by_filter_id/'
            },
            {
                source:'/jmyp',
                target:'http://gz.jumei.com/Ajax/GetHomeTodayLists/100/1'
            }
        ]
    }))
}
module.exports.default = gulp.series(webHandler)